package com.fenghuajueli.lib_provider;

import com.alibaba.android.arouter.launcher.ARouter;
import com.fenghuajueli.module_route.UserModuleRoute;

/**
 * 管理提供各个组件之间通信的管理器
 */
public class ProviderManager {

    private static volatile ProviderManager instance;

    

    public static ProviderManager getInstance() {
        if (instance == null) {
            synchronized (ProviderManager.class) {
                if (instance == null) {
                    instance = new ProviderManager();
                }
            }
        }
        return instance;
    }
    
    

    

    /**
     * 用户系统模块通信暴露工具
     */
    private UserModuleProvider userModuleProvider;

    public UserModuleProvider getUserModuleProvider() {
        if (userModuleProvider == null) {
            userModuleProvider = (UserModuleProvider) ARouter.getInstance().build(UserModuleRoute.USER_EXPORT_PROVIDER).navigation();
        }
        return userModuleProvider;
    }




}
